<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>demos</title>
        <link rel="stylesheet" href="https://cdnjs.loli.net/ajax/libs/mdui/0.4.3/css/mdui.min.css">
		<script src="https://cdnjs.loli.net/ajax/libs/mdui/0.4.3/js/mdui.min.js"></script><!-- 这是我优化ui用的东西，不能删 -->
        <link rel="stylesheet" type="text/css" href="https://index-1048576.gitee.io/guimaker/website/static/style/codearea-sublime.css">
        <link rel="stylesheet" href="https://cdnjs.loli.net/ajax/libs/mdui/0.4.3/css/mdui.min.css">
		<script src="https://cdnjs.loli.net/ajax/libs/mdui/0.4.3/js/mdui.min.js"></script>
		<link href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.0.3/styles/monokai-sublime.min.css" rel="stylesheet">
		<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/highlight.min.js"></script>
        <link rel="icon" href="./static/favicon.ico">
    </head>
    <body class="mdui-typo mdui-container">
        <div style="border-radius:10px;">
        <h1 class="mdui-typo-title">DEMO</h1>
        <p class="mdui-typo-subtitle">这里有一些示例代码<p>
        <p>
            <h3>1. HelloWorld</h3>
            <div class="code" style="width: 600px"><code class="code">
                <span class="keyword">from</span>
                guimaker
                <span class="keyword">import</span>&nbsp;<span class="numbool">*</span><br>
                window<span class="keyword">=</span><span class="function">GUI</span>()<br>
                <span class="important">def</span>
                <span class="names">showmessage</span>():<br>
                &nbsp;&nbsp;&nbsp;&nbsp;<span class="function">msgbox</span>(<span class="string">"Hello!"</span>)<br>
                window.<span class="function">text</span>(<span class="args">text</span><span class="keyword">=</span><span class="string">"Hello world!"</span>)<br>
                window.<span class="function">button</span>(<span class="args">text</span><span class="keyword">=</span><span class="string">"Hit me -- Get a message"</span>,<span class="args">command</span><span class="keyword">=</span>showmessage)<br>
                window.<span class="function">run</span>()
            </code></div>
        </p><br><br><br>
        <p>
            <h3>2. Entry-demo</h3>
            <div class="code" style="width: 600px"><code class="code">
                <span class="keyword">from</span>
                guimaker
                <span class="keyword">import</span>&nbsp;<span class="numbool">*</span><br>
                window<span class="keyword">=</span><span class="function">GUI</span>()<br>
                <span class="important">def</span>&nbsp;<span class="names">check</span>():<br>
                &nbsp;&nbsp;&nbsp;&nbsp;vartt.value<span class="keyword">=</span>varen.value<br>
                varen<span class="keyword">=</span>window.<span class="function">Var</span>(window)<br>
                varett<span class="keyword">=</span>window.<span class="function">Var</span>(window)<br>
                vartt.value<span class="keyword">=</span><span class="string">' '</span><span class="keyword">*</span><span class="numbool">25</span><br>
                window.<span class="function">text</span>(<span class="args">var</span><span class="keyword">=</span>vartt)<br>
                window.<span class="function">enter</span>(<span class="args">var</span><span class="keyword">=</span>varen)<br>
                window.<span class="function">button</span>(<span class="args">text</span><span class="keyword">=</span><span class="string">"ok"</span>,<span class="args">command</span><span class="keyword">=</span>check)<br>
                window.<span class="function">run</span>()
            </code></div>
            </div>
        </p>
        3、Click me to double the text
		<br>
		</code>
		</div>
		<pre>
			<code>
				from guimaker import *
				g = GUI()
				def f():
				    v.value = v*2
				v = g.Var(g)
				v.value = 1
				g.text(var = v)
				g.button(f,text="click me to double the text")
				g.run()
			</code>
		</pre>
    </body>
</html>